

#ifndef FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_PATTERNS_MYCIRCLE_MYCIRCLE_PATTERN_H
#define FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_PATTERNS_MYCIRCLE_MYCIRCLE_PATTERN_H

#include "core/components_ng/pattern/mycircle/mycircle_layout_algorithm.h"
#include "core/components_ng/pattern/mycircle/mycircle_layout_property.h"
#include "core/components_ng/pattern/mycircle/mycircle_paint_method.h"
#include "core/components_ng/pattern/mycircle/mycircle_paint_property.h"
#include "core/components_ng/pattern/pattern.h"

namespace OHOS::Ace::NG {
class MyCirclePattern : public Pattern {
    DECLARE_ACE_TYPE(MyCirclePattern, Pattern);

public:
    MyCirclePattern() {};
    ~MyCirclePattern() override = default;

    RefPtr<NodePaintMethod> CreateNodePaintMethod() override
    {
        return MakeRefPtr<MyCirclePaintMethod>(radiusLength_, edgeWidth_);
    }

    RefPtr<LayoutProperty> CreateLayoutProperty() override
    {
        return MakeRefPtr<MyCircleLayoutProperty>();
    }

    RefPtr<LayoutAlgorithm> CreateLayoutAlgorithm() override
    {
        return MakeRefPtr<MyCircleLayoutAlgorithm>();
    }

    RefPtr<PaintProperty> CreatePaintProperty() override
    {
        return MakeRefPtr<MyCirclePaintProperty>();
    }

private:
    bool OnDirtyLayoutWrapperSwap(const RefPtr<LayoutWrapper>& dirty, const DirtySwapConfig& config) override;
    void OnModifyDone() override;

    float radiusLength_ = 30.0f;
    float edgeWidth_ = .0f;
    ACE_DISALLOW_COPY_AND_MOVE(MyCirclePattern);
};
} // namespace OHOS::Ace::NG

#endif // FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_PATTERNS_MYCIRCLE_MYCIRCLE_PATTERN_H
